package com.koron.order.maintain.mapper;

import com.koron.order.maintain.bean.entity.MaintainPlanPo;
import com.koron.order.maintain.bean.entity.MaintainPo;
import com.koron.order.maintain.bean.query.MaintainQuery;
import com.koron.order.maintain.bean.vo.MaintainVo;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * (Maintain)表数据库访问层
 *
 * @author zhouj
 * @since 2021-09-13 17:42:12
 */
public interface MaintainMapper {

    MaintainPo queryById(String id);

    List<MaintainVo> queryList(MaintainQuery query);

    int insert(MaintainPo maintain);

    int update(MaintainPo maintain);

    int deleteById(String id);

    int submitMaintain(@Param("maintainId") String maintainId, @Param("status") String status);

    List<MaintainPlanPo> queryPlanIdByEqId(@Param("eqId") String eqId);

    int queryMaintainTime(@Param("content") String content, @Param("eqId") String eqId);
    @MapKey("id")
    List<Map<String,String>> getEquipmentByParentId(@Param("parentIds") List<String> parentIds);
}